# 普通模式启动
# gunicorn -w 4 -b 127.0.0.1:5001 manage:app
# 后台模式启动
# gunicorn -w 4 -D -b 127.0.0.1:5001 manage:app
# 配置文件模式启动
# gunicorn --preload -c gunicorn.conf.py manage:app
bind = "0.0.0.0:5001"
workers = 2
threads = 2

max_requests = 50000
max_requests_jitter = 2
timeout = 70
graceful_timeout = 30
limit_request_line = 8190
limit_request_fields = 200
limit_request_fields_size = 8190

# 工作模式协程
worker_class = 'gevent'
# 设置最大并发量
worker_connections = 2000
# 设置gunicorn访问日志格式，错误日志无法设置
access_log_format = '%(t)s %(p)s %(h)s "%(r)s" %(s)s %(L)s %(b)s %(f)s" "%(a)s"'
# 设置进程文件目录
pidfile = '/www/wwwroot/fileshare/logs/gunicorn.pid'
# 设置访问日志和错误信息日志路径
accesslog = '/www/wwwroot/fileshare/logs/gunicorn_acess.log'
errorlog = '/www/wwwroot/fileshare/logs/gunicorn_error.log'
# 设置日志记录水平
loglevel = 'warning'
